The increase in the complexity of modern microprocessors has created a comparable increase in the complexity of the tools used to debug and profile such microprocessors. In-circuit emulators have given way to microprocessors with built-in debug and test ports, through which external computer systems, running debug and test software, communicate with the microprocessor to debug problems and profile the performance of software executing on the microprocessor within a target system. But debug and test ports may be used by a malicious user to bypass security measures implemented within a microprocessor. Regardless of whether such security measures are implemented in hardware or software, the debug and test ports can potentially give a malicious user access to secure portions of a computer system that might otherwise be protected from unauthorized access during non-debug and non-test modes of operation.